﻿using System;

namespace DnPakExplorer {
	public partial class Character : ICharacterProperty {


			/// <summary>
			/// 白字，基础加成
			/// </summary>
			/// <param name="pid"></param>
			/// <returns></returns>
			double GetWhiteProperty(PropertyID pid) {
				if (pid>=PropertyID.Strength && pid<=PropertyID.Stamina)
					return mPlayerBasePropery[(int)pid];	// 基础属性
				else
					return mPlayerBasePropery[(int)pid]		// 基础属性+转换属性
				+ GetProperty(PropertyID.Strength)*mPlayerMatrix[(int)PropertyID.Strength][(int)pid]
				+ GetProperty(PropertyID.Agility)*mPlayerMatrix[(int)PropertyID.Agility][(int)pid]
				+ GetProperty(PropertyID.Intelligence)*mPlayerMatrix[(int)PropertyID.Intelligence][(int)pid]
				+ GetProperty(PropertyID.Strength)*mPlayerMatrix[(int)PropertyID.Strength][(int)pid];
			}

			/// <summary>
			/// 绿字，装备加成
			/// </summary>
			/// <param name="pid"></param>
			/// <returns></returns>
			double GetGreenProperty(PropertyID pid) {
				if (pid>=PropertyID.FireAttack && pid<=PropertyID.DarkAttack)
					return mEquipmentPanel.GetFloatProperty(pid);
				else
					return GetWhiteProperty(pid) * mEquipmentPanel.GetFloatProperty(pid)
					+ mEquipmentPanel.GetPointProperty(pid)*(1+mEquipmentPanel.GetFloatProperty(pid));
			}

			/// <summary>
			/// 蓝字，技能加成
			/// </summary>
			/// <param name="pid"></param>
			/// <returns></returns>
			double GetBluePropery(PropertyID pid) {
				return 0;
			}

			public double GetProperty(PropertyID pid) {
				return GetWhiteProperty(pid)+GetGreenProperty(pid)+GetBluePropery(pid);
			}


			public float critical {
				get { throw new NotImplementedException(); }
			}

			public float criticalDamage {
				get { throw new NotImplementedException(); }
			}

			public float finalDamage {
				get { throw new NotImplementedException(); }
			}

			public float physicalDefense {
				get { throw new NotImplementedException(); }
			}

			public float magicDefense {
				get { throw new NotImplementedException(); }
			}

			public float fireAttack {
				get { throw new NotImplementedException(); }
			}

			public float waterAttack {
				get { throw new NotImplementedException(); }
			}

			public float lightAttack {
				get { throw new NotImplementedException(); }
			}

			public float darkAttack {
				get { throw new NotImplementedException(); }
			}

			public int hp {
				get { throw new NotImplementedException(); }
			}

			public int mp {
				get { throw new NotImplementedException(); }
			}

			public int strength {
				get { throw new NotImplementedException(); }
			}

			public int agility {
				get { throw new NotImplementedException(); }
			}

			public int intelligence {
				get { throw new NotImplementedException(); }
			}

			public int stamina {
				get { throw new NotImplementedException(); }
			}

			public int minPhysicalAttack {
				get { throw new NotImplementedException(); }
			}

			public int maxPhysicalAttack {
				get { throw new NotImplementedException(); }
			}

			public int minMagicAttack {
				get { throw new NotImplementedException(); }
			}

			public int maxMagicAttack {
				get { throw new NotImplementedException(); }
			}

			public float criticalPoint {
				get { throw new NotImplementedException(); }
			}

			public float criticalDamagePoint {
				get { throw new NotImplementedException(); }
			}

			public int finalDamagePoint {
				get { throw new NotImplementedException(); }
			}

			public int physicalDefensePoint {
				get { throw new NotImplementedException(); }
			}

			public int magicDefensePoint {
				get { throw new NotImplementedException(); }
			}
	}
}
